package com.effectivsocial.domain;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;

import javax.persistence.GeneratedValue;
import javax.persistence.Id;

import javax.persistence.Table;
import lombok.Getter;
import lombok.Setter;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.envers.Audited;


import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;

@XStreamAlias("put-attribute")
@Entity
@Table(name = "t_view_attribute")
@Audited
public class ViewAttribute implements Serializable {

	private static final long serialVersionUID = 1L;
	
	@Getter @Setter
	@Id
	@GeneratedValue(generator = "uuid")
	@GenericGenerator(name = "uuid", strategy = "uuid2")
	@Column(name = "id", updatable = false, nullable = false, unique = true)
	private String id;
	
	@XStreamAsAttribute
	@Getter @Setter
	@Column(name = "name" , length = 250)
	private String name;
	
	@XStreamAsAttribute
	@Getter @Setter
	@Column(name = "type" , length = 250)
	private String type;
	
	@XStreamAsAttribute	
	@Getter @Setter
	@Column(name = "value" , length = 1000)
	private String value;
	
	@XStreamAsAttribute
	@Getter @Setter
	@Column(name = "cascade_attribute")
	private boolean cascadeAttribute;
	
	

	
}
